﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;

namespace HotelMgr.Models
{
    public class RoomType
    {
        [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int RoomTypeID { get; set; }
        /// <summary>
        /// 类型名称
        /// </summary>
        [DisplayName ("类型名称"),Required]
        [StringLength(20)]
        public string TypeName { get; set; } 

        /// <summary>
        /// 价格
        /// </summary>
        [DisplayName("价格")]
        [Range(0.01, 1000)]
        public decimal? Price { get; set; }

        public virtual ICollection<Room> Rooms { get; set; }
        
    }
}